Published 2005-09-22 22:17:56
#netstat -n | grep 25This indicated a few outgoing connections on port 25, so I asked one of my collegues who thankfully knows linux better than me;) for ideas to track down what process was doing this.
tcp 0 0 myip:33236 someip:25 TIME_WAIT
#fuser 33236/tcpThis indicated the process id that was causing the connection, and now down to good old ps
33236/tcp: 25045
#ps auxw | grep 25045Agh - Apache was causing port 25 connections. - My first thought was some horrific mistake I made with my PHP code, but a quick look through the apache log files indicated that my suspicions where not quite correct. the apache log file had rather a large number of these.. - from various ip addresses.
www-data 25045 ...... /usr/sbin/apache2 -k start -DSSL
210.245.151.81 - - ... "POST http://202.81.252.1:25/ HTTP/1.1" 200 ..At this point I started to suspect the reverse proxies on my server (especially as I had set it up again recently on another server and had to deal with the default config there)
<Proxy *>This blocks all access to the proxy, So after adding this file, to enable my old reverse proxies, I had to add sections like this to open a few specific proxies
Order deny,allow
Deny from all
#Allow from .your_domain.com
</Proxy>
<Proxy http://devel/>The only problem I had was that my php5 server was running on port 81, and this config failed to allow access via the reverse proxy.
Order allow,deny
Allow from all
</Proxy>
<Proxy http://php5.akbkhome.com:81/>Anyway, at least I'm not a spammer anymore..
#this doesnt work?!!!
Order allow,deny
Allow from all
</Proxy>